<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ include file="../../common/init.jsp" %>
<script type="text/javascript" src="${ctx}/static/00100/javascripts/app.js"></script>
<script type="text/javascript" src="${ctx}/static/00100/javascripts/gopay/scan/scanPayChannel.js?222"></script>

<link type="text/css" rel="stylesheet" href="${ctx}/static/00100/stylesheets/scanpay.css" media="all"/>

<script type="text/javascript">
    var bankAcctNum = '${bankAcctNum }';
    var length = '${payChannelDtlInfosLength}';
    $(function () {
        if (length == 2) {
            $("#scanPayChannels").addClass("multChoise");
        } else {
            $("#scanPayChannels").removeClass("multChoise");
        }
    });
</script>

<div class="choosebox">
    <div class="tabscon" id="scanPayTab" style="display: none;">


        <form id="scanPayForm" name="scanPayForm" action="${ctx}/sec/00100/pay/confirm.shtml">
            <input type="hidden" name="payChannel" id="payChannel" value="16"/>
            <input type="hidden" name="orderId" id="orderId" value="<%=request.getParameter("orderId")%>"/>
            <input type="hidden" name="formhash" id="formhash" value="${formhash }"/>
            <input type="hidden" name="pageFrom" value="order"/>
            <input type="hidden" name="payWay" value="A"/>
            <input type="hidden" name="gopayAcctId" id="gopayAcctId" value=""/>
            <input type="hidden" name="orderKey" id="orderKey" value="<%=request.getParameter("orderKey")%>"/>
        </form>

        <!--只有两项支付时去掉 multChoise-->
        <div id="scanPayChannels" class="choise">
            <div class="row">

                <c:forEach items="${payChannelDtlInfos }" var="payChannelDtlInfo">
                    <c:if test="${payChannelDtlInfo.outStlmId eq 'WECHAT'}">
                        <div class="wechat">
                            <img class="choisepic" src="${ctx}/static/00100/images/weixin.png">
                            <a href="javascript:toScanPay('WECHAT')">生成二维码</a>
                        </div>
                    </c:if>
                    <c:if test="${payChannelDtlInfo.outStlmId eq 'ALIPAY'}">
                        <div class="alipay">
                            <img class="choisepic" src="${ctx}/static/00100/images/ali.png">
                            <a href="javascript:toScanPay('ALIPAY')">生成二维码</a>
                        </div>
                    </c:if>
                </c:forEach>
                <div class="gopay">
                    <img class="choisepic" src="${ctx}/static/00100/images/gopay1.png">
                    <a href="javascript:toScanPay('GOPAYWALLET')">生成二维码</a>
                </div>
            </div>
        </div>
    </div>
</div>